Stupid problem with resampling

by: Michael Taylor, 7 years ago


I feel like a complete dolt.  When I resample a straightforward monthly series into quarterly, using df_q = df.resample('Q').mean(),  what comes out is: a
Date
2016-03-31    299195.190
2016-06-30           NaN
2016-09-30           NaN
2016-12-31           NaN
2017-03-31    307132.375
Freq: Q-DEC, Name: Exports, dtype: float64

What's going wrong?  Associated question: why I am such a dolt?



You must be logged in to post. Please login or register an account.



Hmm, we'd need to see your original data. Do you have data for these periods? Is the data for certain in numerical form? Sometimes you can have pandas thinking some values are string.

-Harrison 7 years ago

You must be logged in to post. Please login or register an account.